package com.cino;

import com.cino.common.URL;
import com.cino.protocol.HttpServer;
import com.cino.register.LocalRegister;
import com.cino.register.MapRemoteRegister;

public class Provider {

    public static void main(String[] args) {

        LocalRegister.register(HelloService.class.getName(), HelloServiceImpl.class);

        //注册中心 服务注册
        URL url = new URL("localhost",8080);
        MapRemoteRegister.regist(HelloService.class.getName(),url);

        //tomcat
        HttpServer httpServer = new HttpServer();
        httpServer.start(url.getHostname(), url.getPort());
    }
}
